/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Project;

import Common.IDocument;
import Common.IProject;
import Common.IUnitCollection;

/**
 *
 * @author Администратор
 */
public class Document extends Unit implements IDocument {

    protected IUnitCollection units;

    public Document(IProject project) {
        super(project.AsUnitHolder());
        this.units = new UnitCollection(this);
        this.setAttribute("DoucmentType").setValue("");       
    }

    //<editor-fold defaultstate="collapsed" desc="Initialize IDocument">
    public IProject getProject() {
        return (IProject) this.getUnitHolder();
    }

    public void setDoucmentType(String doucmentType) {
        this.getAttribute("DoucmentType").setValue(doucmentType);
    }

    public String getDoucmentType() {
        return this.getAttribute("DoucmentType").getValue().toString();
    }

    //</editor-fold>
    //<editor-fold defaultstate="collapsed" desc="Initialize IUnitHolder">
    public IUnitCollection getUnits() {
        return this.units;
    }
    //</editor-fold>
}
